﻿// JScript File

/// used by dynamic pages - start
     function AddRow(page_id)
     {
        var id="ctl00__sys" + page_id + "_RowCount";
        var obj=document.getElementById(id);
        var val = parseInt(obj.value) + 1;
        obj.value = val;
        
        var ctrlid = "ctl00_ContentPlaceHolder3_btn_"+page_id+"_Add_1";
        var loc = document.location.href;
        if(loc.toLowerCase().indexOf("transdoc.aspx")==-1) // Added by srivatsan for dynamic pages add to create post back
        {
            if(document.getElementById(ctrlid)!=null)
            {
                __doPostBack(ctrlid,'');
            }
        }
        return true;
     }
     
     function RemoveRow(page_id,row_id)
     {
        var id= "ctl00__sys" + page_id + "_RowCount";
        var obj=document.getElementById(id);
        
        id= "ctl00_ContentPlaceHolder3_hih_DelPageId";
        obj=document.getElementById(id);
        obj.value = page_id;
        
        id= "ctl00_ContentPlaceHolder3_hih_DelRowId";
        obj=document.getElementById(id);
        obj.value = row_id;
        return true;
     }
/// used by dynamic pages - end
    